
//// 30 Seconds


clear
use "cleandata\winprob_matched_dataset30_60"
keep if event=="Rated Bullet game"
xtset game turn
drop if timecontrol_iv
keep if abs(start_eval)<=500

local time=30
local cutoff=9.5
local lbound=3
local ubound=17



gen eval_change=(mover_eval+l.mover_eval)/100

label var eval_change "Change in Stockfish Evaluation"
label var clock "Seconds Remaining"
label var timetaken "Seconds Spent on Move"
binscatter eval_change clock if clock>=`lbound' & clock<=`ubound', ///
	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Change in Stockfish Evaluation") ///
	lcolor(orange_red) mcolor(forest_green)
graph export "exhibits/eval_beep`time'.pdf", as(pdf) replace

binscatter timetaken clock if clock>=`lbound' & clock<=`ubound', ///
	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Seconds Spent on Move") ///
	lcolor(orange_red) mcolor(forest_green)
graph export "exhibits/time_beep`time'.pdf", as(pdf) replace



gen dummyoverten=clock>=`cutoff'
reg eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound'
est sto rd`time'
reghdfe eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound', absorb(movercode)
est sto rd`time'_fe

hist clock if clock>=`lbound' & clock<=`ubound', discrete xline(`cutoff', lcolor(gs8) lpattern(dash)) freq fcolor(white) lcolor(dkgreen) ylabel(#3, format(%12.3g))
graph export "exhibits/hist_beep`time'.pdf", as(pdf) replace




/// 1 minute


clear
use "cleandata\winprob_matched_dataset60_180"
keep if event=="Rated Bullet game"
xtset game turn
drop if timecontrol_iv
keep if abs(start_eval)<=500

local time=60
local cutoff=9.5
local lbound=3
local ubound=17

gen eval_change=(mover_eval+l.mover_eval)/100
label var eval_change "Change in Stockfish Evaluation"
label var clock "Seconds Remaining"
label var timetaken "Seconds Spent on Move"
binscatter eval_change clock if clock>=`lbound' & clock<=`ubound', ///
	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Change in Stockfish Evaluation") ///
	lcolor(orange_red) mcolor(forest_green)

graph export "exhibits/eval_beep`time'.pdf", as(pdf) replace

binscatter timetaken clock if clock>=`lbound' & clock<=`ubound', ///
	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Seconds Spent on Move") ///
	lcolor(orange_red) mcolor(forest_green)
graph export "exhibits/time_beep`time'.pdf", as(pdf) replace

gen dummyoverten=clock>=`cutoff'
reg eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound'
est sto rd`time'
reghdfe eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound', absorb(movercode)
est sto rd`time'_fe

hist clock if clock>=`lbound' & clock<=`ubound', discrete xline(`cutoff', lcolor(gs8) lpattern(dash)) freq fcolor(white) lcolor(dkgreen) ylabel(#3, format(%12.3g))
graph export "exhibits/hist_beep`time'.pdf", as(pdf) replace

//
//
//
// /// 3 minute but looking near 10 second
//
//
// clear
// use "cleandata\winprob_matched_dataset180_300"
// keep if event=="Rated Blitz game"
// xtset game turn
// drop if timecontrol_iv
// keep if abs(start_eval)<=500
//
// local time=180
// local cutoff=9.5
// local lbound=3
// local ubound=17
//
// gen eval_change=(mover_eval+l.mover_eval)/100
// label var eval_change "Change in Stockfish Evaluation"
// label var clock "Seconds Remaining"
// label var timetaken "Seconds Spent on Move"
// binscatter eval_change clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Change in Stockfish Evaluation") ///
// 	lcolor(orange_red) mcolor(forest_green)
//
// graph export "exhibits/eval_beep`time'_cutoff10.pdf.pdf", as(pdf) replace
// binscatter timetaken clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Seconds Spent on Move") ///
// 	lcolor(orange_red) mcolor(forest_green)
// graph export "exhibits/time_beep`time'_cutoff10.pdf.pdf", as(pdf) replace
//
//
// gen dummyoverten=clock>=`cutoff'
// reg eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound'
// est sto rd`time'
// reghdfe eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound', absorb(movercode)
// est sto rd`time'_fe
//
// hist clock if clock>=`lbound' & clock<=`ubound', discrete xline(`cutoff', lcolor(gs8) lpattern(dash)) freq fcolor(white) lcolor(dkgreen) ylabel(#3, format(%12.3g))
// graph export "exhibits/hist_beep`time'_cutoff10.pdf", as(pdf) replace
//
//


//
//
//
// /// 3 minute
//
//
// clear
// use "cleandata\winprob_matched_dataset180_300"
// keep if event=="Rated Blitz game"
// xtset game turn
// drop if timecontrol_iv
// keep if abs(start_eval)<=500
//
// local time=180
// local cutoff=21.5
// local lbound=10
// local ubound=35
//
// gen eval_change=(mover_eval+l.mover_eval)/100
// label var eval_change "Change in Stockfish Evaluation"
// label var clock "Seconds Remaining"
// label var timetaken "Seconds Spent on Move"
// binscatter eval_change clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Change in Stockfish Evaluation") ///
// 	lcolor(orange_red) mcolor(forest_green)
//
// graph export "exhibits/eval_beep`time'.pdf", as(pdf) replace
// binscatter timetaken clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Seconds Spent on Move") ///
// 	lcolor(orange_red) mcolor(forest_green)
// graph export "exhibits/time_beep`time'.pdf", as(pdf) replace
//
//
// gen dummyoverten=clock>=`cutoff'
// reg eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound'
// est sto rd`time'
// reghdfe eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound', absorb(movercode)
// est sto rd`time'_fe
//
// hist clock if clock>=`lbound' & clock<=`ubound', discrete xline(`cutoff', lcolor(gs8) lpattern(dash)) freq fcolor(white) lcolor(dkgreen) ylabel(#3, format(%12.3g))
// graph export "exhibits/hist_beep`time'.pdf", as(pdf) replace
//
//
//
//
//
//
//
// /// 5 minute
//
//
//
// clear
// use "cleandata\winprob_matched_dataset300_600"
// keep if event=="Rated Blitz game"
// xtset game turn
// drop if timecontrol_iv
// keep if abs(start_eval)<=500
//
// local time=300
// local cutoff=37.5
// local lbound=20
// local ubound=60
//
// gen eval_change=(mover_eval+l.mover_eval)/100
// label var eval_change "Change in Stockfish Evaluation"
// label var clock "Seconds Remaining"
// label var timetaken "Seconds Spent on Move"
// binscatter eval_change clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Change in Stockfish Evaluation") ///
// 	lcolor(orange_red) mcolor(forest_green)
//
// graph export "exhibits/eval_beep`time'.pdf", as(pdf) replace
//
// binscatter timetaken clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Seconds Spent on Move") ///
// 	lcolor(orange_red) mcolor(forest_green)
// graph export "exhibits/time_beep`time'.pdf", as(pdf) replace
//
// gen dummyoverten=clock>=`cutoff'
// reg eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound'
// est sto rd`time'
// reghdfe eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound', absorb(movercode)
// est sto rd`time'_fe
//
// hist clock if clock>=`lbound' & clock<=`ubound', discrete xline(`cutoff', lcolor(gs8) lpattern(dash)) freq fcolor(white) lcolor(dkgreen) ylabel(#3, format(%12.3g))
// graph export "exhibits/hist_beep`time'.pdf", as(pdf) replace
//



//
//
// /// 5 minute but looking near 10 second
//
//
// clear
// use "cleandata\winprob_matched_dataset300_600"
// keep if event=="Rated Blitz game"
// xtset game turn
// drop if timecontrol_iv
// keep if abs(start_eval)<=500
//
// local time=300
// local cutoff=9.5
// local lbound=3
// local ubound=17
//
// gen eval_change=(mover_eval+l.mover_eval)/100
// label var eval_change "Change in Stockfish Evaluation"
// label var clock "Seconds Remaining"
// label var timetaken "Seconds Spent on Move"
// binscatter eval_change clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Change in Stockfish Evaluation") ///
// 	lcolor(orange_red) mcolor(forest_green)
//
// graph export "exhibits/eval_beep`time'_cutoff10.pdf.pdf", as(pdf) replace
// binscatter timetaken clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Seconds Spent on Move") ///
// 	lcolor(orange_red) mcolor(forest_green)
// graph export "exhibits/time_beep`time'_cutoff10.pdf.pdf", as(pdf) replace
//
//
// gen dummyoverten=clock>=`cutoff'
// reg eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound'
// est sto rd`time'
// reghdfe eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound', absorb(movercode)
// est sto rd`time'_fe
//
// hist clock if clock>=`lbound' & clock<=`ubound', discrete xline(`cutoff', lcolor(gs8) lpattern(dash)) freq fcolor(white) lcolor(dkgreen) ylabel(#3, format(%12.3g))
// graph export "exhibits/hist_beep`time'_cutoff10.pdf", as(pdf) replace
//
//
//
//
//
//
// /// 10 minute
//
//
// clear
// use "cleandata\winprob_matched_dataset600_900"
// keep if event=="Rated Blitz game" | event=="Rated Classical game"
// xtset game turn
// drop if timecontrol_iv
// keep if abs(start_eval)<=500
//
// local time=600
// local cutoff=59.5
// local lbound=20
// local ubound=100
//
// gen eval_change=(mover_eval+l.mover_eval)/100
// label var eval_change "Change in Stockfish Evaluation"
// label var clock "Seconds Remaining"
// label var timetaken "Seconds Spent on Move"
// binscatter eval_change clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Change in Stockfish Evaluation") ///
// 	lcolor(orange_red) mcolor(forest_green)
//
// graph export "exhibits/eval_beep`time'.pdf", as(pdf) replace
//
// binscatter timetaken clock if clock>=`lbound' & clock<=`ubound', ///
// 	rd(`cutoff') discrete linetype(lfit) xtitle("Seconds Remaining") ytitle("Seconds Spent on Move") ///
// 	lcolor(orange_red) mcolor(forest_green)
// graph export "exhibits/time_beep`time'.pdf", as(pdf) replace
//
// gen dummyoverten=clock>=`cutoff'
// reg eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound'
// est sto rd`time'
// reghdfe eval_change c.clock##i.dummyoverten if clock>=`lbound' & clock<=`ubound', absorb(movercode)
// est sto rd`time'_fe
//
// hist clock if clock>=`lbound' & clock<=`ubound', discrete xline(`cutoff', lcolor(gs8) lpattern(dash)) freq fcolor(white) lcolor(dkgreen) ylabel(#3, format(%12.3g))
// graph export "exhibits/hist_beep`time'.pdf", as(pdf) replace
//
//
//
//
// esttab rd?? rd???, se
//
//
// esttab rd*_fe, se
//




